package cn.edu.neusoft.wuguangsheng.flowerimpression.model;

import java.util.List;

import cn.edu.neusoft.wuguangsheng.flowerimpression.bean.FKnowBean;
import cn.edu.neusoft.wuguangsheng.flowerimpression.iface.FKnowListIface;
import cn.edu.neusoft.wuguangsheng.flowerimpression.listener.ListListener;
import cn.edu.neusoft.wuguangsheng.flowerimpression.service.AllService;
import retrofit2.Call;
import retrofit2.Retrofit;

public class FKnowListModel extends RetrofitBaseModel implements FKnowListIface<FKnowBean> {

    private AllService allService;
    private Retrofit retrofit;
    public FKnowListModel(){
        retrofit=getRetrofit();
        allService=getAllService();
    }
    @Override
    public void getFknowList(String title,ListListener listListener) {
        Call<List<FKnowBean>> call = allService.getFknowList(title);
        callenqueueList(call,listListener);
    }

    @Override
    public void getAllFknowList(ListListener<FKnowBean> listListener) {
        Call<List<FKnowBean>> call = allService.getAllFknowList();
        callenqueueList(call,listListener);
    }
}
